<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>后台管理</title>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/bootstrap.min.css') }}"/>
    <link rel="stylesheet" href="{{ url_for('static',filename='css/login.css') }}"/>

</head>
<body>
<div class="header">
</div>

<div class="main">

    <h2 class="page-title">管理员登陆</h2>
    <div class="login-box-body">
    {% for msg in get_flashed_messages() %}
        <p class="login-box-msg">{{ msg }}</p>
    {% endfor %}
        <form action="{{ url_for('admin.login') }}" method="post">
            <div class="form-container">
                <div class="form-group">
                    {{ form.name }}
                    {% for err in form.name.errors %}
                        <div class="col-md-12">
                            <p style="color:red">{{ err }}</p>
                        </div>
                    {% endfor %}
                </div>
                <div class="form-group">
                    {{ form.pwd }}
                    {% for err in form.pwd.errors %}
                        <div class="col-md-12">
                            <font style="color:red">{{ err }}</font>
                        </div>
                    {% endfor %}
                </div>
            </div>
            <div class="form-group">
                {{ form.submit }}
                {{ form.csrf_token }}  {# 防跨站CSRF保护 #}
            </div>
    </div>
    </form>
</div>
</div>
<div class="footer">
    <p>&copy; GPL</p>
</div>

</body>
</html>